<template>
  <basic-container>
    <avue-crud
        v-if="tableOption"
        v-bind="bindVal"
        v-on="onEvent"
        v-model:page="page"
        v-model="startForm">
      <template #menu-btn="{type,size,row}">
        <el-dropdown-item icon="el-icon-search"
                          :size="size"
                          @click.native="noticeBrowsePage(row)"
                          :type="type">浏览记录
        </el-dropdown-item>
      </template>
    </avue-crud>
  </basic-container>
</template>

<script>

import {createStaticMixin} from "@/mixins/startCrud.js"
import autoRouter from "@/views/sys/sysNotice/autoRouter";
import sysNoticeOption from "@/option/sys/sysNoticeOption";
import * as sysNoticeApi from "@/api/sys/sysNoticeApi";

const option = {}
option.name = "sys/sysNotice"
option.option = sysNoticeOption
option.api = sysNoticeApi

export default {
  mixins: [createStaticMixin(option)],
  methods: {
    noticeBrowsePage(row) {
      let title = row.title + "-浏览记录"
      this.$router.push({path: autoRouter.names.sysNotice.browse.path + "/" + row.id + "/" + title})
    }
  }
}
</script>

<style scoped>

</style>
